<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Photo album 文章</title>
    <script src="../js/vue.min.js"></script>
    <script src="../js/jquery.3.2.1.min.js"></script>
    <script src="../js/rem.js"></script>
    <script src="../js/data.js"></script>
    <link rel="stylesheet" href="../css/conwen.css">
</head>
<body>

<div class="wen-box">
    <a class="wen-top" href="../index.html">&lt;&lt;</a>
    <h2>{{shuju.conwen[0].title}}</h2>
    <ul>
        <li>{{shuju.conwen[0].shijian}}</li><li>{{shuju.conwen[0].zuozhe}}</li>
    </ul>
    <div class="wen-text" v-html="shuju.context[0]">
    </div>
</div>


</body>
</html>
<script>
    window.onload = function () {
        const vm = new Vue({
            el: '.wen-box',
            data:{
                shuju:data
            },
            methods:{

            },
            created(){
                var url = location.search;
                var str = url.substring(1,url.length).split('=')[1];
                console.log(str);

                $(".wen-box h2").text('{{shuju.conwen['+str+'].title}}');
                $(".wen-box ul li:nth-child(1)").text('{{shuju.conwen['+str+'].shijian}}').next().text('{{shuju.conwen['+str+'].zuozhe}}');
                $(".wen-text").attr('v-html','shuju.context['+str+']');
            },
        });
    };


</script>